﻿using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
namespace DAL
{
    public class StoreService
    {
        //商家表操作
        //新增商家 
        public bool Addstore(Store store) 
        {
            string sql = string.Format("insert store values('{0}')",store.StoreName);
            return DBhelper.ex(sql);
        }
        public SqlDataReader StoreType()
        {
            string sql = string.Format("select *from Store");
            return DBhelper.DataReader(sql);
        }
        //查询全部商家
        public SqlDataReader SumStore() 
        {
            string sql = string.Format("select*from store ");
            return DBhelper.DataReader(sql);
        }
    }
}
